#coding=utf-8
from numpy import *
from mlCource import logRegres

path ="D:\Project\P_Pycharm\ldwuPythonHome\data"
fileName = path + "\\testSet.txt"
def t_rs():
    dataMat,labelMat = logRegres.loadDataSet(fileName)
    print dataMat[0]
    print logRegres.gradAscent(dataMat,labelMat)

def t_01():
    dataMat,labelMat = logRegres.loadDataSet(fileName)
    print dataMat[0]
    dataMatrix = mat(dataMat)
    print dataMatrix[0:5]
    m,n = shape(dataMatrix)
    print m,n
    # print ones((n,1))
    print mat(labelMat[0:5]).transpose()

if __name__ == '__main__':
    t_01()